import request from '@/utils/request'

// 查询听证报告列表
export function listHearingReport(query) {
  return request({
    url: '/ruoyi-system/hearingreport/list',
    method: 'get',
    params: query,
  })
}

// 查询听证报告审批详细
export function getHearingReport(id) {
  return request({
    url: '/ruoyi-system/hearingreport/' + id,
    method: 'get',
  })
}

// 新增听证报告审批
export function addHearingReport(data) {
  return request({
    url: '/ruoyi-system/hearingreport',
    method: 'post',
    data: data,
  })
}

// 修改听证报告审批
export function updateHearingReport(data) {
  return request({
    url: '/ruoyi-system/hearingreport',
    method: 'put',
    data: data,
  })
}

// 删除听证报告审批
export function delHearingReport(id) {
  return request({
    url: '/ruoyi-system/hearingreport/' + id,
    method: 'delete',
  })
}

// 预览

export function previewHearingReport(params) {
  return request({
    url: '/ruoyi-system/hearingreport/preview',
    method: 'get',
    params,
  })
}

// 详情页预览
export function previewPdf(data) {
  return request({
    url: '/ruoyi-system/hearingreport/pdfPreview',
    method: 'post',
    data,
  })
}

// 保存附件
export function addHearingReportFiles(data) {
  return request({
    url: '/ruoyi-system/hearingreport/addFiles',
    method: 'post',
    data,
  })
}

// 导出
export function exportHearingReport(data) {
  return request({
    url: '/ruoyi-system/hearingreport/export',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 立案号下拉
export function getCaseList() {
  return request({
    url: '/ruoyi-system/hearingreport/caseList',
    method: 'get',
  })
}

export function getContent(id) {
  return request({
    url: '/ruoyi-system/hearingreport/getContent?caseId=' + id,
    method: 'get',
  })
}
